﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BeatingMole
{
    /// <summary>
    /// Nguyễn Đặng Anh Duy
    /// MSSV : 11100204
    /// Email : itc.anhduy@gmail.com
    /// <summary>
    class CInfoButton
    {
        #region "Variable"
        private Texture2D _spriteBatch;
        private Dictionary<string, Rectangle> _xmlSpriteBatch;
        private Button _stateButton;
        ContentManager _Content;
        #endregion

        #region "Properties"
        public Texture2D SpriteBatch
        {
            set { _spriteBatch = value; }
            get { return _spriteBatch; }
        }

        public Dictionary<string, Rectangle> XmlSpriteBatch
        {
            set { _xmlSpriteBatch = value; }
            get { return _xmlSpriteBatch; }
        }
        public Button StateButton
        {
            set { _stateButton = value; }
            get { return _stateButton; }
        }
        #endregion

        #region "Constructor"
        /// <summary>
        /// Phương thức khởi tạo không tham số
        /// </summary>
        public CInfoButton(ContentManager content)
        {
            _Content = content;
            _spriteBatch = null;
            _xmlSpriteBatch = null;
            _stateButton = Button.None;
        }

        /// <summary>
        /// Phương thức khởi tạo có tham số
        /// </summary>
        /// <param name="spriteBatch">Ảnh của button</param>
        /// <param name="xmlSpriteBatch">Tập tin tọa độ của button</param>
        /// <param name="stateButton">Trạng thái button</param>
        public CInfoButton(ContentManager content, Texture2D spriteBatch, Dictionary<string, Rectangle> xmlSpriteBatch, Button stateButton)
        {
            _Content = content;
            SpriteBatch = spriteBatch;
            XmlSpriteBatch = xmlSpriteBatch;
            StateButton = stateButton;
        }

        /// <summary>
        /// Phương thức khởi tạo sao chép tham số
        /// </summary>
        /// <param name="b">Đối tượng Button</param>
        public CInfoButton(CInfoButton b)
        {
            SpriteBatch = b.SpriteBatch;
            XmlSpriteBatch = b.XmlSpriteBatch;
            StateButton = b.StateButton;
        }
        #endregion
    }
}
